/**
 * 饿汉式创建对象：线程安全调用效率高，但是不能延迟加载
 *
 * @author ItJianGe
 * @data 2024/7/22 17:41
 */
public class HungrySingle {
    private static HungrySingle hungrySingle = new HungrySingle();

    private HungrySingle() {
    }

    public static HungrySingle getLazySingle() {
        return hungrySingle;
    }

    public void say() {
        System.out.println("饿汉调用了这个方法。。。");
    }
}
